<template>
  <div class="teacher home-column">
    <home-title title="推荐讲师" @more="handleMore"></home-title>
    <edu-teacher-list
      v-if="teacherList.length > 0"
      :teacherList="teacherList"
      @next="handleItemClick"
    ></edu-teacher-list>
  </div>
</template>

<script>
import HomeTitle from './homeTitle.vue'
import EduTeacherList from '@/components/EduTeacherList'
export default {
  components: {
    HomeTitle,
    EduTeacherList
  },
  props: {
    teacherList: {
      type: Array
    }
  },
  methods: {
    handleItemClick(id) {
      this.$router.push({
        path: '/user',
        query: {
          id
        }
      })
    },
    handleMore() {
      this.$router.push({ path: '/teacher' })
    }
  }
}
</script>

<style lang="scss" scoped>
.teacher {
  padding: 30px 15px;
  ::v-deep .teacher-list .item {
    border: 1px solid $border-color-divider;
  }
}
</style>
